package br.unipar.blog;

import br.unipar.blog.entity.UniparRevisionEntity;
import org.hibernate.envers.RevisionListener;

public class UniparRevisionListener implements RevisionListener {

    @Override
    public void newRevision(Object revisionEntity) {
        //Authentication a = SecurityContextHolder.getContext().getAuthentication();
        //String username = a.getName();
        String username = "usuario";
        UniparRevisionEntity entity = (UniparRevisionEntity) revisionEntity;
        entity.setUsername(username);
    }
    
}
